<template>
  <section class="nb-tree-wrapper">
    <div class="tree-item">
      <tree-node
        v-for="item in data"
        :data="item"
        :key="item.id"
        :defaultKey="defaultKey"
        :defaultExpand="defaultExpand"
        :special="special"
      ></tree-node>
    </div>
  </section>
</template>

<script>
  import {CollapseTransition} from 'element-ui'
  import TreeNode from './treeNode.vue'
  export default {
    data () {
      return {}
    },
    props: {
      data: Array,
      defaultKey: {
        type: Object,
        default: () => {
          return {
            key: 'id',
            child: 'subResources',
            value: 'assigned',
            name: 'name'
          }
        }
      },
      defaultExpand: {
        type: Boolean,
        default: () => {
          return true
        }
      },
      special: Boolean
    },
    components: {
      ElCollapseTransition: CollapseTransition,
      TreeNode
    },
    methods: {
    },
    mounted () {
    }
  }
</script>

<style lang="scss">
.nb-tree-wrapper{

}
</style>
